package model;

import common.GridCoordinate;

/**
 * @author Colin
 * 
 * Defensive Items are the items that can be placed on trail tiles
 * to either slow zombosaurs or damage them.
 * This class adds the damage that defensive items do on zombosaurs,
 * and the 'health' of the item.
 */

public abstract class DefensiveItem extends PlayableItem {
	
	private int health;
	private int damage;
	
	//DefensiveItem without position
	public DefensiveItem( String name, String imageName, int cost, int health, int damage){
		super( name, imageName, cost);
		
		this.health = health;
		this.damage = damage;
	}
	
	//DefensiveItem with position
	public DefensiveItem( String name, String imageName, int cost, GridCoordinate position, int health, int damage){
		super( name, imageName, cost, position );
		
		this.health = health;
		this.damage = damage;
	}
	
	
	/**
	 * What happens when the item is contacted
	 * 
	 * @param damage
	 */
	public abstract void onContact( Zombosaur zombosaur );
	
	public abstract boolean isDestroyed();
	
	public String getUsageDescription(){
		return "Click to select the item, then click on the desired position to place it. Must be laid on the trail!";
	}
	
}
